<template>
  <div class="userBox m-user">
      <template v-if="user">
        欢迎你，<span class="username">{{user}}</span>
        <nuxt-link to="/exit">退出</nuxt-link>
      </template>
      <template v-else>
          <nuxt-link to="/login" class="login">立即登录</nuxt-link>
          <nuxt-link to="/register" class="login">注册</nuxt-link>
      </template>
  </div>
</template>
<style rel="stylesheet/scss" lang="scss" scoped>

</style>
<script>
export default {
  data() {
    return {
      user:""
    }
  },
    //检测视图值变化触发，有改变就会触发
  computed:{

  },
   //创建实例时就会触发
  created() {

  },
  mounted() {

  },

  methods:{

  },
  components: {

  },
}
</script>
